//
//  ADCDN_GameTaskViewController.m
//  ADCDN_APP
//
//  Created by sumeng_01 on 2021/7/1.
//  Copyright © 2021 llh. All rights reserved.
//

#import "ADCDN_GameTaskViewController.h"

@interface ADCDN_GameTaskViewController ()

@end

@implementation ADCDN_GameTaskViewController
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    //游戏控制器会隐藏导航栏 返回时需重新设置下导航栏
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"游戏任务";
    
    [self setupUI];

}
-(void)taskClick{
    //点击模拟完成任务
    //完成任务后 需调用一下以下方法
    [[ADCDN_GameManager shareManager] ADCDN_appNoticeSdkCompleteTask:self.dict];
    [self.navigationController popViewControllerAnimated:YES];
}
-(void)setupUI{
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(50, 120, ScreenW - 100, 40)];
    [btn addTarget:self action:@selector(taskClick) forControlEvents:UIControlEventTouchUpInside];
    btn.layer.cornerRadius = 8;
    btn.layer.masksToBounds = YES;
    btn.backgroundColor = [UIColor redColor];
    [btn setTitle:@"点击模拟完成任务" forState:0];
    [btn setTitleColor:[UIColor whiteColor] forState:0];
    [self.view addSubview:btn];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
